using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using Web.Core.Providers;

namespace Web.Core.Objects
{
    public class Currencies
    {
        public static ArrayList GetAllCurrencies()
        {
            return DataProvider.GetInstance().GetCurrencies(0, "", "", 0);
        }

        public static Currency GetCurrenciesByName(string name)
        {
            return DataProvider.GetInstance().GetCurrencies(0, name, "", 0)[0] as Currency;
        }
        public static Currency GetCurrenciesByID(int cID)
        {
            return DataProvider.GetInstance().GetCurrencies(cID, "", "", 0)[0] as Currency;
        }
        public static int Insert(Currency curr)
        {
            return DataProvider.GetInstance().CreateUpdateDeleteCurrencies(curr, GlobalStorage.Action.Insert);
        }
        public static int Delete(Currency curr)
        {
            return DataProvider.GetInstance().CreateUpdateDeleteCurrencies(curr, GlobalStorage.Action.Delete);
        }
        public static int Update(Currency curr)
        {
            return DataProvider.GetInstance().CreateUpdateDeleteCurrencies(curr, GlobalStorage.Action.Update);
        }
    }
}
